package com.ruoyi.project.hissys.domain;

import com.ruoyi.framework.web.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Objects;

/**
 * @author zsz
 * @since 1.0
 * @date 2021.04.27
 */
public class HisSysDept extends BaseEntity implements Serializable {


    private Long deptId;
    @NotBlank(message = "这个属性必须要填写")
    private String deptName;
    private String deptCode;
    private Integer deptNum;
    private String deptLeader;
    private String phone;
    private String status;

    public HisSysDept() {

    }

    public HisSysDept(Long deptId, String deptName, String deptCode, Integer deptNum, String deptLeader, String phone, String status) {
        this.deptId = deptId;
        this.deptName = deptName;
        this.deptCode = deptCode;
        this.deptNum = deptNum;
        this.deptLeader = deptLeader;
        this.phone = phone;
        this.status = status;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getDeptCode() {
        return deptCode;
    }

    public void setDeptCode(String deptCode) {
        this.deptCode = deptCode;
    }

    public Integer getDeptNum() {
        return deptNum;
    }

    public void setDeptNum(Integer deptNum) {
        this.deptNum = deptNum;
    }

    public String getDeptLeader() {
        return deptLeader;
    }

    public void setDeptLeader(String deptLeader) {
        this.deptLeader = deptLeader;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof HisSysDept)) return false;
        HisSysDept hisSysDept = (HisSysDept) o;
        return Objects.equals(getDeptId(), hisSysDept.getDeptId()) &&
                Objects.equals(getDeptName(), hisSysDept.getDeptName()) &&
                Objects.equals(getDeptCode(), hisSysDept.getDeptCode()) &&
                Objects.equals(getDeptNum(), hisSysDept.getDeptNum()) &&
                Objects.equals(getDeptLeader(), hisSysDept.getDeptLeader()) &&
                Objects.equals(getPhone(), hisSysDept.getPhone()) &&
                Objects.equals(getStatus(), hisSysDept.getStatus());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getDeptId(), getDeptName(), getDeptCode(), getDeptNum(), getDeptLeader(), getPhone(), getStatus());
    }

    @Override
    public String toString() {
        return "HisSysDept{" +
                "deptId=" + deptId +
                ", deptName='" + deptName + '\'' +
                ", deptCode='" + deptCode + '\'' +
                ", deptNum=" + deptNum +
                ", deptLeader='" + deptLeader + '\'' +
                ", phone='" + phone + '\'' +
                ", status='" + status + '\'' +
                "} " + super.toString();
    }
}
